/*
 * @Author: HZK
 * @Date: 2020-09-08 14:08:50
 * @LastEditTime: 2020-09-08 14:41:30
 * @LastEditors: hanfengmi
 * @Description: 公共尾部
 */
import React, { PureComponent } from 'react'
import styles from './index.less'
import icon from '@/assets/default.png'
import LogoW from '@/assets/logo_w.png'
import { ReactComponent as ComLogo } from '@/assets/logo.svg'
import { ReactComponent as Position } from '@/assets/position.svg'
import Img from '@/components/Img'
import { getUrlKey } from '@/utils/index'

class Index extends PureComponent {
  render() {
    const icons = [
      {name: '7x24', content: '小时响应', icon: icon},
      {name: '优质', content: '享受服务', icon: icon},
      {name: '全年', content: '运维保障', icon: icon},
      {name: '多渠道', content: '服务支持', icon: icon}
    ]

    const quickLink = [
      {name: '用友成功云', url: `/up_service/index.php?r=up_shop/index&ciId=${getUrlKey('ciId')}`},
      {name: '学习认证', url: 'https://www.imotian.com/motianweb/classIfication/classIfication/'},
      {name: '创新者社区', url: `/assets2/new-fwq/dist/#/home?ciId=${getUrlKey('ciId')}`},
      // {name: '活动', url: `/up_service/index.php?r=up_shop/index&ciId=${getUrlKey('ciId')}`},
      // {name: '协作交流', url: `/up_service/index.php?r=up_shop/index&ciId=${getUrlKey('ciId')}`},
      {name: '问答', url: `/up_service/index.php?r=up_mask/home&ciId=${getUrlKey('ciId')}`},
      {name: '帮助中心', url: `up_service/index.php?r=search/UpSearchEngine&ciId=${getUrlKey('ciId')}`}
      // {name: '服务后台', url: `/up_service/index.php?r=up_shop/index&ciId=${getUrlKey('ciId')}`}
    ]

    const friendLink = [
      {name: '用友官网', url: 'https://www.yonyou.com'},
      // {name: 'YonBIP', url: `/up_service/index.php?r=up_shop/index&ciId=${getUrlKey('ciId')}`},
      {name: '用友云官网', url: 'https://www.yonyoucloud.com'},
      // {name: 'YonSuite', url: `/up_service/index.php?r=up_shop/index&ciId=${getUrlKey('ciId')}`},
      {name: '用友云市场', url: 'https://market.yonyoucloud.com'},
      {name: '云平台', url: 'https://iuap.yonyoucloud.com'}
    ]

    return (
      <div className={`${styles.Footer}`}>
        <div className={styles.FooterIcons}>
          {icons.map(e=> {
            return (
              <div className={styles.IconsItem} key={e.name}>
                <img src={e.icon} alt="img" />
                <div className={styles.IconsItemText}>
                  <p>{e.name}</p>
                  <p>{e.content}</p>
                </div>
              </div>
            )
          })}
        </div>
        <div className={styles.FooterBase}>
          <div className={`${styles.FooterLinkLeft}`}>
            <Img  imgClass={styles.LinkLeftLogo} src={LogoW} />
            <p></p>
            <p><Position /> <span> 北京市海淀区北清路68号用友产业园</span></p>
          </div>
          <div className={`${styles.FooterLinkRight}`}>
            <div className={`${styles.LinkRight}`}>
              <p className={`${styles.LinkRightTitle}`}>快速入口</p>
              <div className={`${styles.LinkRightItem}`}>
                { quickLink.map(e => <p key={e.name}><a href={e.url} target="_blank" rel='noreferrer'>{e.name}</a></p>) }
              </div>
            </div>
            <div className={`${styles.LinkRight}`}>
              <p className={`${styles.LinkRightTitle}`}>友情链接</p>
              <div className={`${styles.LinkRightItem}`}>
                { friendLink.map(e=> <p key={e.name}><a href={e.url} target="_blank" rel='noreferrer'>{e.name}</a></p>) }
              </div>
            </div>
          </div>
        </div>
        <div className={`${styles.FooterCompany}`}>
          <ComLogo />
          <p>用友网络科技股份有限公司 © Copyright 2019 京ICP备05007539号-24 京ICP证100714号</p>
        </div>
      </div>
    )
  }
}

export default Index